package Control;

public class CatchPhrase {
	private Character character;
	private String phrase;
	private int count;
	private Episode firstepisode;
	
	public CatchPhrase() {
		super();
		count = 0;
		
	}

	public Character getCharacter() {
		return character;
	}

	public void setCharacter(Character character) {
		this.character = character;
	}

	public String getPhrase() {
		return phrase;
	}

	public void setPhrase(String phrase) {
		this.phrase = phrase;
	}

	public int getCount() {
		return count;
	}

	public void incrCount(int count) {
		this.count += count;
	}

	public Episode getFirstepisode() {
		return firstepisode;
	}

	public void setFirstepisode(Episode firstepisode) {
		this.firstepisode = firstepisode;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((phrase == null) ? 0 : phrase.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		CatchPhrase other = (CatchPhrase) obj;
		if (phrase == null) {
			if (other.phrase != null)
				return false;
		} else if (!phrase.equals(other.phrase))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "Catchphrase: phrase = " + this.phrase+" count = "+count + " character = " + this.character + " firstEpisode = " + this.firstepisode;
	}
	
	
	
}
